const mongoose = require('mongoose')

const schema = new mongoose.Schema({
    xn: {
        type: String
    },//学年
    nid: {
        type: String
    }, //学号
    name: {
        type: String //姓名
    },
    sex: {
        type: String //性别
    },
    identity: {
        type: String //身份证号
    },
    class: {
        type: mongoose.SchemaTypes.ObjectId, //所属班级
            ref: 'Class'
    },
    specialty: {
        type: mongoose.SchemaTypes.ObjectId, //所属专业
        ref: 'Specialty'
    },
    phone: {
        type: String //手机号
    },
    address: {
        type: String //家庭地址
    },
    nativeplace:{
        type:String
    },//籍贯
    source:{
        type:String
    },//来源地
    nation:{
        type:String
    },//民族
})

module.exports = mongoose.model('Student', schema)